home *** CD-ROM | disk | FTP | other *** search
- Path: zippy.cais.net!news
- From: mgeiger@drsystems.com (Mark Geiger)
- Newsgroups: comp.lang.c
- Subject: Re: What's so different about 2-D arrays???
- Date: Tue, 02 Jan 1996 01:04:38 GMT
- Organization: Capital Area Internet Service info@cais.com 703-448-4470
- Message-ID: <4ca3j0$fsj@zippy.cais.net>
- References: <820451938.20697@fredblog.demon.co.uk> <4c799b$q9d@umbc9.umbc.edu>
- Reply-To: mgeiger@drsystems.com
- NNTP-Posting-Host: 205.252.35.151
- X-Newsreader: Forte Free Agent 1.0.82
-
- schlein@umbc.edu (Jonas J. Schlein) wrote:
-
- [snip]
-
- >|>
- >|> //My own chess recorder program
-
- >Illegal comment! This is comp.lang.c not comp.lang.c++.
-
- Give me a break.
-
- >|> #include <stdio.h>
- >|> #include <ctype.h>
-
- >Why do you need <ctype.h>?
-
- What difference does it make?
-
- >|> /*Prototypes*/
- >|> void setup(char pos[8][8]);
- >|>
- >|> void main()
-
- >Please read the FAQ. This will show you why 'int main (void)' is the correct
- >declaration for your particular program.
-
- Couldn't you have put this a bit more constructively?
-
- >|> {
- >|> char pos[8][8];
- >|>
- >|> setup(pos);
- >|>
- >|>
- >|> printf("\nWell Done!!");
-
- >A simple 'return (0);' would go here nicely.
-
- Not the way it was coded...main is a void function. Yes, I know that
- he should return an explicit value and not some random garbage, but
- sarcasm is seldom helpful.
-
- >|> }
- >|>
- >|> void setup(char pos[8][8])
-
- >What exactly do you think an array is and how do you believe it is
- >supposed to be indexed? In C arrays start at 0 so an array with
- >8 elements is indexed from 0-7 not 1-8. This is true for each and
- >every dimension of a multi-dimensional array.
-
- IMHO, this is the only valuable paragraph in your post, but we could
- have done without the first sentence.
-
- My point in responding in this manner is that people should be able to
- ask questions in this forum without being subjected to ridicule and
- petty criticism.
-
-
-
-